<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title></title>
    <style>
    .left div,
    .right div {
        width: 100%;
        height: 50px;
        padding: 5px;
        margin: 5px;
        float: left;
        border: 1px solid #ccc;
        display: none;
    }
    .left div {
        background: #bbffaa;
    }
    
    .right div {
        background: yellow;
    }
    </style>
    <script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>
</head>

<body>
    <h2>slideDown</h2>
    <div class="left">
        <h4>测试一</h4>
        <div id="a1">hide-show</div>
        <button>点击slideDown显示动画</button>
        <script type="text/javascript">
        //点击buttom
        //执行3秒隐藏
        //执行3秒显示
        $("button:first").click(function() {
            $("#a1").slideDown(3000)
        });
        </script>

        <h4>测试二</h4>
        <div id="a2">hide-show</div>
        <button>点击slideDown执行回调</button>
        <script type="text/javascript">
        //点击buttom
        //执行3秒隐藏
        //执行3秒显示
        $("button:last").click(function() {
            $("#a2").slideDown(3000,function(){
                alert('动画执行结束')
            })
        });
        </script>
</body>


</html>
